﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ThanhTu.GNC.Media.KQXS.DataAccess.BL;
using System.Data;

namespace GNCMedia.KQXS
{
    public partial class GncKQXS : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                StyleLotteryBL vStyle = new StyleLotteryBL();
                DataTable dt = vStyle.SelectAll();
                if (dt.Rows.Count > 0)
                {
                    foreach (DataRow item in dt.Rows)
                    {
                        if (item["POSITION"].ToString().Equals("top-right"))
                        {
                            ImageAdvRight.ImageUrl = item["SETTINGVALUE"].ToString();
                        }
                        else
                        {
                            if (item["POSITION"].ToString().Equals("top-left"))
                            {
                                ImageAdvTopLeft.ImageUrl = item["SETTINGVALUE"].ToString();
                            }
                        }

                        //if (item["POSITION"].ToString().Equals("buttomImg"))
                        //{
                        //    ImageLogoButtom.ImageUrl = item["SETTINGVALUE"].ToString();
                        //}
                        //else
                        //{
                        //    if (item["POSITION"].ToString().Equals("buttomImg1"))
                        //    {
                        //        ImageLogoButtom1.ImageUrl = item["SETTINGVALUE"].ToString();
                        //    }

                        //}

                    }
                }
            }
            catch (Exception ex)
            {
                Response.Write("Master: " + ex.Message);
            }

        }
    }
}